//encryptor.cpp
#include "encryptor.h"

word encryptor::encrypt (word w)
{
	char* str = w.getstr();
	int i;
	for (i = 0; i < w.getlen(); i++)
	{
		if (i % 2 == 0)
		{
			str[i] = up(str[i]);
		}
		else
		{
			str[i] = down(str[i]);
		}
	}
	str[w.getlen()] = '\0';
	word result(str);
	result = rshift(result);
	return result;
}

